<template>
  <page-meta :page-style="'overflow:'+(show?'hidden':'visible')"></page-meta>
  <skeleton v-if="skeleton" />
  <!-- <view class="mengban" @click="delmask" v-if="mask">
			<image class="yindao" :style="dynamicStyle" src="../../static/img/home_img_tczmian.png"/>
		</view> -->
  <view class="content">
    <view class="pages">
      <swiper autoplay circular class="index-bgi">
        <swiper-item>
          <image
            src="https://www.diandianyouke.site:801/fileDataBase/static/stag/static/img/home_bg1.png"
            class="index-bgi"
          ></image>
        </swiper-item>
        <swiper-item>
          <image
            src="https://www.diandianyouke.site:801/fileDataBase/static/stag/static/img/home_bg2.png"
            class="index-bgi"
          ></image>
        </swiper-item>
        <swiper-item>
          <image
            src="https://www.diandianyouke.site:801/fileDataBase/static/stag/static/img/home_bg3.png"
            class="index-bgi"
          ></image>
        </swiper-item>
      </swiper>
      <view class="data">
        <!-- <view class="date-title">
					<view class="item" v-for="v in tab" :key="v.id" @tap="changeTab(v.id)">
						<view :class="v.id == current ? 'item-desc-active' : 'item-desc'">{{v.name}}</view>
						<view class="line" v-if="v.id == current"></view>
					</view>
				</view> -->
        <view class="data-top">
          <view class="today">平台数据</view>
          <p>{{ timestamp2Time(today) + "更新" }}</p>
        </view>
        <view class="data-bottom">
          <view class="data-bottom-item">
            <p class="h1">
              {{ formatNumber(data.playNum, 1)
              }}<span style="font-size: 28rpx">+ {{ unit1 }}次</span>
            </p>
            <p>全网播放量</p>
          </view>
          <view class="data-bottom-item">
            <p class="h1">
              {{ formatNumber(data.creatationNum, 2)
              }}<span style="font-size: 28rpx">+ {{ unit2 }}条</span>
            </p>
            <p>视频创作量</p>
          </view>
          <view class="data-bottom-item">
            <p class="h1">
              {{ formatNumber(data.businNum, 3)
              }}<span style="font-size: 28rpx">{{ unit3 }}家</span>
            </p>
            <p>服务商家数</p>
          </view>
        </view>
      </view>
      <view class="content-bottom">
        <view class="feature">
          <view class="guoqi" v-if="isExpired!= 0">
            <image @click="isExpired=0" style="width: 48rpx;height: 48rpx;" src="https://www.diandianyouke.site:801/fileDataBase/static/stag/static/img/home_dq_icon_gbi.png" mode="" />
            <view style="display: flex;">
              <view class="guoqi-left">
                <image style="width: 32rpx;height: 32rpx;margin-right: 6rpx;" src="https://www.diandianyouke.site:801/fileDataBase/static/stag/static/img/home_dq_icon_txing.png" mode="" />
                <text v-if="isExpired==1">会员已到期</text>
                <text v-if="isExpired==2">会员{{Math.floor((shopArr[Number(index)].ka.endDate - currentTime)/millisecondsPerDay) }}天后到期</text>
                <text v-if="isExpired==3">合成额度剩余{{ shopArr[Number(index)].ka.useNum}}次</text>
              </view>
              <view class="guoqi-right">
                请<text class="renew" @click="this.$refs.inputDialog.open()">续费</text>
              </view>
            </view>
          </view>
          <view class="shop-choose" @click="pullMenu()">
            <view style="display: flex; align-items: center; height: 100%">
              <image
                class="shop-img"
                src="https://www.diandianyouke.site:801/fileDataBase/static/stag/static/images/shopChoose.png"
              />
              <text
                style="max-width: 280rpx; overflow: hidden; text-overflow: ellipsis"
                >{{ shopText ? shopText : "创建店铺" }}</text
              >
              <image
                style="width: 32rpx; height: 32rpx"
                src="https://www.diandianyouke.site:801/fileDataBase/static/stag/static/img/home_icon_Select.png"
              />
            </view>
          </view>
          <view class="video">
            <view class="view-item" @click="gotoIP()" style="margin-right: 22rpx;background: linear-gradient(132.87deg,rgba(252,250,255,1)0%,rgb(252,245,252)100%);">
              <image
                src="https://www.diandianyouke.site:801/fileDataBase/static/stag/static/img/home_znpshe.png"
                class="ip"
              ></image>
              <view class="ip-desc">
                <view class="top">智能剪辑</view>
                <view class="bottom">AI创作视频</view>
              </view>
            </view>
            <view class="view-item" @click="gotoVideos()" style="background: linear-gradient(132.87deg,rgba(255,254,245,1)0%,rgb(255,244,235)100%);">
              <image
                src="https://www.diandianyouke.site:801/fileDataBase/static/stag/static/img/home_jjku.png"
                class="ip"
              ></image>
              <view class="ip-desc">
                <view class="top">剪辑库</view>
                <view class="bottom">轻松管理视频</view>
              </view>
            </view>
          </view>
          <view class="small">
            <view class="bind" @click="goOneClick">
              <image style="width: 64rpx; height: 64rpx;margin-bottom: 12rpx;" src="https://www.diandianyouke.site:801/fileDataBase/static/stag/static/img/home_icon_yjcpian.png" mode="" />
              <view>一键成片</view>
            </view>
            <view class="bind" @click="goMaster">
              <image style="width: 64rpx; height: 64rpx;margin-bottom: 12rpx;" src="https://www.diandianyouke.site:801/fileDataBase/static/stag/static/img/home_icon_drtdian.png" mode="" />
              <view>达人探店</view>
            </view>
            <view class="bind" @click="goPublicity">
              <image style="width: 64rpx; height: 64rpx;margin-bottom: 12rpx;" src="https://www.diandianyouke.site:801/fileDataBase/static/stag/static/img/home_icon_cpxchuan.png" mode="" />
              <view>产品宣传</view>
            </view>
            <view class="bind" @click="goOriginality">
              <image style="width: 64rpx; height: 64rpx;margin-bottom: 12rpx;" src="https://www.diandianyouke.site:801/fileDataBase/static/stag/static/img/home_icon_cyspi b.png" mode="" />
              <view>创意视频</view>
            </view>
            <view class="bind" @click="goCut">
              <image style="width: 64rpx; height: 64rpx;margin-bottom: 12rpx;" src="https://www.diandianyouke.site:801/fileDataBase/static/stag/static/img/home_icon_jtkuan.png" mode="" />
              <view>剪同款</view>
            </view>
            <view class="bind" @click="material">
              <image style="width: 64rpx; height: 64rpx;margin-bottom: 12rpx;" src="https://www.diandianyouke.site:801/fileDataBase/static/stag/static/img/home_icon_zlscai.png" mode="" />
              <view>资料素材</view>
            </view>
            
            <view class="bind" @click="bind">
              <image style="width: 64rpx; height: 64rpx;margin-bottom: 12rpx;" src="https://www.diandianyouke.site:801/fileDataBase/static/stag/static/img/home_squan.png" mode="" />
              <view>授权绑定</view>
            </view>
          </view>
        </view>
        <view class="feature" style="padding-top: 30rpx;">
          <view class="small" style="margin-top: 0;">
            <view class="bind" @click="goDaren" style="margin-bottom: 0">
              <image style="width: 64rpx; height: 64rpx;margin-bottom: 12rpx;" src="https://www.diandianyouke.site:801/fileDataBase/static/stag/static/img/home_icon_drtdian.png" mode="" />
              <view>达人号</view>
            </view>
            <view class="bind" @click="goMatrix" style="margin-bottom: 0">
                <image style="width: 64rpx; height: 64rpx;margin-bottom: 12rpx;" src="https://www.diandianyouke.site:801/fileDataBase/static/stag/static/img/home_icon_drtdian.png" mode="" />
                <view>矩阵分发</view>
            </view>
            <view class="bind" @click="goPush" style="margin-bottom: 0">
                <image style="width: 64rpx; height: 64rpx;margin-bottom: 12rpx;" src="https://www.diandianyouke.site:801/fileDataBase/static/stag/static/img/home_gktui.png" mode="" />
                <view>顾客推</view>
            </view>
          </view>
        </view>
        <view class="setbar">
          <image
            @click="gotoSetpBar()"
            src="https://www.diandianyouke.site:801/fileDataBase/static/stag/static/img/home_img_Advertising.png"
            style="width: 690rpx; height: 200rpx"
          />
        </view>
      </view>
    </view>
  </view>
  <!-- 普通弹窗 -->
  <uni-popup ref="popup" @change="popupChange" :safe-area="false">
    <view v-if="!shopArr.length" class="popup-content">
      <view class="text">
        <text style="font-size: 32rpx; font-weight: 700"
          >我的店铺（{{ shopArr.length }}）</text
        >
        <image
          @click="closePopup"
          style="width: 48rpx; height: 48rpx;position: absolute;right: 30rpx;"
          src="https://www.diandianyouke.site:801/fileDataBase/static/stag/static/img/list_button_Close.png"
        />
      </view>
      <view class="popup-bottom">
        <view class="popup-bottom-box">
          <view class="popup-bottom-lift">
            <image
              style="width: 72rpx; height: 72rpx; margin-right: 20rpx"
              src="https://www.diandianyouke.site:801/fileDataBase/static/stag/static/img/icon_dianpu@3x.png"
            />
            <view>
              <p>创建店铺</p>
              <p class="try-text">发布爆款视频</p>
            </view>
          </view>
          <!-- <image @click="goToShop" style="width: 200rpx;height: 64rpx;" src="https://www.diandianyouke.site:801/fileDataBase/static/stag/static/img/topUp@3x.png"/> -->
          <view class="right-btn" @click="goToShop">
            <text>创建店铺</text>
            <image
              class="arrow"
              src="https://www.diandianyouke.site:801/fileDataBase/static/stag/static/img/list_icon_Activate.png"
            />
          </view>
        </view>
        <view
          style="
            font-size: 24rpx;
            color: rgb(144, 147, 153);
            text-align: center;
            margin-top: 24rpx;
            margin-bottom: 24rpx;
          "
          >没有更多数据了</view
        >
      </view>
      <view
        style="
          width: 100%;
          height: 70rpx;
          background-color: #fff;
          position: fixed;
          bottom: 0;
          left: 0;
        "
      ></view>
    </view>
    <view v-else class="popup-content">
      <scroll-view scroll-y>
        <view class="text">
          <text style="font-size: 32rpx; font-weight: 700"
            >我的店铺（{{ notStates.length }}）</text
          >
          <image
            @click="closePopup"
            style="width: 48rpx; height: 48rpx;position: absolute;right: 30rpx;"
            src="https://www.diandianyouke.site:801/fileDataBase/static/stag/static/img/list_button_Close.png"
          />
        </view>
        <view class="popup-bottom">
          <view class="popup-bottom-box" v-for="(item, index) in notStates" :key="index">
            <view class="popup-bottom-lift">
              <image
                style="width: 72rpx; height: 72rpx; margin-right: 20rpx"
                :src="
                  item.shopImgPath
                    ? item.shopImgPath
                    : 'https://www.diandianyouke.site:801/fileDataBase/static/stag/static/img/topUp1@3x.png'
                "
              />
              <view>
                <view style="display: flex">
                  <p
                    style="
                      max-width: 158px;
                      overflow: hidden;
                      text-overflow: ellipsis;
                      white-space: nowrap;
                      margin-right: 6rpx;
                    "
                  >
                    {{ item.shopName }}
                  </p>
                  <image
                    v-if="item.ka&&item.ka.productName"
                    style="width: 87rpx; height: 28rpx"
                    :src="filSrc(item.ka)"
                    mode=""
                  />
                  <image 
                    v-else 
                    style="width: 87rpx; height: 28rpx"
                    :src="noFilSrc(item)"
                    />
                </view>
                <p class="try-text">创建于{{ timestamp2Time(item.createDate) }}</p>
              </view>

              <!-- <image v-if="item.state==1" style="width: 80rpx;height: 40rpx;margin-left: 10rpx; transform: translateY(-12rpx);" src="https://www.diandianyouke.site:801/fileDataBase/static/stag/static/img/activate@3x.png"/> -->
            </view>
            <!-- <image @click="goToIP(index)" style="width: 200rpx;height: 64rpx;" :src="item.state==1?'https://www.diandianyouke.site:801/fileDataBase/static/stag/static/img/getIP@3x.png':'https://www.diandianyouke.site:801/fileDataBase/static/stag/static/img/button_fufei@3x.png'"/> -->
            <view class="right-btn" @click="goToIP(index)">
              <text>{{ item.state == 1 ? "打造爆款" : "开通会员" }}</text>
              <image
                class="arrow"
                src="https://www.diandianyouke.site:801/fileDataBase/static/stag/static/img/list_icon_Activate.png"
              />
            </view>
          </view>
          <view
            style="
              font-size: 24rpx;
              color: rgb(144, 147, 153);
              text-align: center;
              margin-top: 24rpx;
              margin-bottom: 24rpx;
            "
            >没有更多数据了</view
          >
        </view>
      </scroll-view>
      <view
        style="
          width: 100%;
          height: 70rpx;
          background-color: #f1f1f1;
          position: fixed;
          bottom: 0;
          left: 0;
        "
      ></view>
    </view>
  </uni-popup>
  <uni-popup ref="popup1" @change="popupChange" :safe-area="false">
    <view v-if="!shopArr.length" class="popup-content">
      <view class="text">
        <text style="font-size: 32rpx; font-weight: 700"
          >我的店铺（{{ shopArr.length }}）</text
        >
        <image
          @click="closePopup"
          style="width: 48rpx; height: 48rpx;position: absolute;right: 30rpx;"
          src="https://www.diandianyouke.site:801/fileDataBase/static/stag/static/img/list_button_Close.png"
        />
      </view>
      <view class="popup-bottom">
        <view class="popup-bottom-box">
          <view class="popup-bottom-lift">
            <image
              style="width: 72rpx; height: 72rpx; margin-right: 20rpx"
              src="https://www.diandianyouke.site:801/fileDataBase/static/stag/static/img/icon_dianpu@3x.png"
            />
            <view>
              <p>创建店铺</p>
              <p class="try-text">发布爆款视频</p>
            </view>
          </view>
          <!-- <image @click="goToShop" style="width: 200rpx;height: 64rpx;" src="../../static/img/topUp@3x.png"/> -->
          <view class="right-btn" @click="goToShop">
            <text>创建店铺</text>
            <image
              class="arrow"
              src="https://www.diandianyouke.site:801/fileDataBase/static/stag/static/img/list_icon_Activate.png"
            />
          </view>
        </view>
        <view
          style="
            font-size: 24rpx;
            color: rgb(144, 147, 153);
            text-align: center;
            margin-top: 24rpx;
            margin-bottom: 24rpx;
          "
          >没有更多数据了</view
        >
      </view>
      <view
        style="
          width: 100%;
          height: 720rpx0rpx;
          background-color: #fff;
          position: fixed;
          bottom: 0;
          left: 0;
        "
      ></view>
    </view>
    <view v-else class="popup-content">
      <view class="text">
        <text style="font-size: 32rpx; font-weight: 700"
          >我的店铺（{{ shopArr.length }}）</text
        >
        <image
          @click="closePopup"
          style="width: 48rpx; height: 48rpx;position: absolute;top: 30rpx;left: 30rpx;"
          src="https://www.diandianyouke.site:801/fileDataBase/static/stag/static/img/list_button_Close.png"
        />
      </view>
      <view class="popup-bottom1">
        <view style="height: 700rpx">
          <radio-group @change="radioChange">
            <label
              class="popup-bottom-label"
              v-for="(item, i) in shopArr"
              :key="i"
              style="display: flex"
            >
              <view>
                <radio color="rgba(142,84,244,1)" :checked="i==index" :value="i" />
              </view>
              <view class="popup-bottom-lift">
                <view class="record" v-if="getExpired1(i)==1||getExpired1(i)==2||getExpired1(i)==3">
                  <view style="display: flex;align-items: center;">
                    <image style="width: 32rpx;height: 32rpx;margin-right:6rpx;" src="https://www.diandianyouke.site:801/fileDataBase/static/stag/static/img/home_dq_icon_txing.png" mode="" />
                    <text v-if="getExpired1(i)==1">会员已到期</text>
                    <text v-if="getExpired1(i)==2">会员即将到期</text>
                    <text v-if="getExpired1(i)==3">合成额度不足</text>
                  </view>
                  <text @click="getRecord(i)" style="color: rgb(142,84,244);font-weight: 500;">续费</text>
                </view>
                <view class="box">
                  <image
                  style="width: 72rpx; height: 72rpx; margin-right: 20rpx"
                  :src="item.shopImgPath?item.shopImgPath:'https://www.diandianyouke.site:801/fileDataBase/static/stag/static/img/topUp1@3x.png'"
                />
                <view>
                  <view style="display: flex;align-items: center;">
                    <p
                      style="
                        max-width: 364rpx;
                        overflow: hidden;
                        text-overflow: ellipsis;
                        white-space: nowrap;
                        margin-right: 6rpx;
                      "
                    >
                      {{ item.shopName }}
                    </p>
                    <image
                      v-if="item.ka&&item.ka.productName"
                      style="width: 87rpx; height: 28rpx"
                      :src="filSrc(item.ka)"
                      mode=""
                    />
                    <image 
                    v-else 
                    style="width: 87rpx; height: 28rpx"
                    :src="noFilSrc(item)"
                    />
                  </view>
                  <p class="try-text">创建于{{ timestamp2Time(item.createDate) }}</p>
                </view>
                </view>
                
              </view>
            </label>
            <view
              style="
                font-size: 24rpx;
                color: rgb(144, 147, 153);
                text-align: center;
                margin-top: 24rpx;
                margin-bottom: 24rpx;
              "
              >没有更多数据了</view
            >
          </radio-group>
        </view>
      </view>
      <view style="height: 329rpx"></view>
      <view class="fixed">
        <!-- <button hover-class="hover" class="manageBtn" @click="manageBtn()">管理店铺</button> -->
        <button hover-class="hover" class="verifyBtn" @click="verifyBtn()">确认</button>
      </view>
    </view>
  </uni-popup>
  <uni-popup ref="popupCenter" @change="popupChange">
    <view class="centerPopup">
      <image
        @click="closePopup"
        class="image"
        src="https://www.diandianyouke.site:801/fileDataBase/static/stag/static/img/list_button_Close.png"
      />
      <text class="tishi">如需开通店铺,请联系客服!</text>
      <button class="lianxi" @click="goService">联系客服</button>
    </view>
  </uni-popup>
  <!-- 续费弹窗 -->
  <uni-popup ref="inputDialog" type="dialog" @change="popupChange">
				<uni-popup-dialog ref="inputClose" type="info" title="请输入卡密" @confirm="dialogInputConfirm"> 
          <input style="border: 1px solid rgb(144,147,153);font-size: 22rpx;border-radius: 8rpx;width: 400rpx;" type="text" v-model="kaMi">
        </uni-popup-dialog> 
	</uni-popup>
  <uni-popup ref="bind" type="dialog" @change="popupChange">
				<uni-popup-dialog ref="inputClose" type="info" mode="base" title="请输入店铺授权码" @confirm="bindConfirm"> 
          <input style="border: 1px solid rgb(144,147,153);font-size: 22rpx;border-radius: 8rpx;width: 400rpx;" type="text" v-model="code">
        </uni-popup-dialog>
	</uni-popup>
  <uni-popup ref="masterCheck" :mask-click="false" @change="popupChange">
    <view class="master-check">
      <image @click="masterBack" class="master-close" src="https://www.diandianyouke.site:801/fileDataBase/static/stag/static/img/home_zdy_icon_schu.png"/>
      <view class="master1" style="margin-bottom: 36rpx;" :class="master==1?'active-master':''" @click="masterChoose(1)">
        <view class="master1-box">
          <text>智能口播</text>
          <aip-checkbox :check="master==1"></aip-checkbox>
        </view>
        <text style="font-size: 24rpx;color: rgb(144,147,153);">选择要宣传的产品,系统会自动生成口播内容</text>
      </view>
      <view class="master1" :class="master==2?'active-master':''" @click="masterChoose(2)">
        <view class="master1-box">
          <text>场景口播</text>
          <aip-checkbox :check="master==2"></aip-checkbox>
        </view>
        <text style="font-size: 24rpx;color: rgb(144,147,153);">每个场景单独设置口播,可达到画面与口播一致</text>
      </view>
      <button hover-class="hover" class="master-queren" @click="masterClose">确认</button>
    </view>
  </uni-popup>
  <uni-popup ref="alertDialog" :mask-click="false" @change="popupChange">
		<view class="alert-dialog">
      <view class="alert-title">你有一份编辑草稿，是否要恢复?</view>
      <view class="alert-time">你{{ formatTimestamp(datePopup) }}在小程序编辑了一份草稿</view>
      <view class="alert-btn">
        <view class="alert-quxiao" @click="draftCancel">取消</view>
        <view class="alert-queren" @click="draftRecover">恢复</view>
      </view>
    </view>
	</uni-popup>
</template>

<script>
import skeleton from "./skeleton.vue";
import { httpRequest } from "../../utils/http";
import { onShareAppMessage } from "@dcloudio/uni-app";
import aipCheckbox from "../../components/index/aip-checkbox.vue"
export default {
  components: {
    skeleton,
    aipCheckbox
  },
  data() {
    return {
      isTab: 0,
      mapIndex: "地址",
      strArr: [],
      shopArr: [],
      isShow: 0,
      isMenu: false,
      type: "",
      materialArr: ["视频素材", "个人素材"],
      shopText: uni.getStorageSync("shopText"), //店铺名称
      shopId: 0, //当前商铺ID
      index: 0, //当前选择店铺的索引
      date: "",
      current: 0,
      data: {},
      today: new Date().getTime(),
      launchOptions: uni.getLaunchOptionsSync(),
      mask: true,
      dynamicStyle: {
        top: 0,
        left: 0,
      },
      skeleton: true,
      notStates: [],
      shopName: 0,
      provider: "",
      price: 0,
      description: "",
      orderNum: "",
      openId: "",
      signature: "",
      businessId: 0,
      productId: 0,
      checked: "",
      showPrivacy: false,
      unit1: "",
      unit2: "",
      unit3: "",
      isProcessingClick:false,
      isExpired:0,//店铺状态（是否过期）
      currentTime:new Date().getTime(),//当前时间
      millisecondsPerDay :24*60*60*1000, //一天的毫秒数
      kaMi:'',//为店铺续期上传的卡密
      i:false,
      isRecord:false,
      code:'',
      index1:'',
      show:false,
      master:1,
      datePopup:'',
      shopKaList:[],
      publicity:0, //产品宣传
    };
  },
  onLoad(options) {
    // #ifdef MP-WEIXIN  
    //获取用户权限
    uni.getSetting({
      success: ({ authSetting, subscriptionsSetting }) => {
        console.log(authSetting);
      },
      fail: (error) => {},
    });
    //从代理商分享入口进入
    if (options.openId) {
      //传递openId和code到服务器
      uni.login({
        success: async (result) => {
          const res = await httpRequest("/api/WeChatLogin", "POST", {
            code: result.code,
            agentNum: options.openId,
          });
          console.log(res);
        },
        fail: (error) => {},
      });
    }
    //蒙版是否显示
    if (this.launchOptions.scene == 1023) {
      this.mask = false;
    }
    console.log(this.mask);
    const position = uni.getMenuButtonBoundingClientRect();
    this.dynamicStyle.top = `${position.bottom + 5}px`;
    this.dynamicStyle.left = `${position.left + position.width / 4}px`;
    console.log(this.launchOptions);
    // 开启小程序原生右上角分享按钮
    uni.showShareMenu({
      withShareTicket: true,
      menus: ["shareAppMessage", "shareTimeline"], //开启转发好友和转发朋友圈按钮
      title: "店店有客",
      imageUrl:
        "https://www.diandianyouke.site:801/fileDataBase/static/stag/static/images/b9f43815b7fccb2443ab7c6724f0cf7.png",
    });
    // #endif
  },
  //用户点击分享按钮
  onShareAppMessage() {
    return {
      title: "店店有客",
      path: "/pages/index/index",
      imageUrl:
        "https://www.diandianyouke.site:801/fileDataBase/static/stag/static/images/b9f43815b7fccb2443ab7c6724f0cf7.png",
    };
  },
  onShow(e) {
    this.publicity = 0
    uni.showTabBar();
      //登录获取信息
    this.getlogin();
    this.businessId = uni.getStorageSync("business").businessId;
    this.getIndexAPI();
    this.shopText = uni.getStorageSync("shopText")||uni.getStorageSync('shop')[0].shopName;
    console.log('索引',uni.getStorageSync("index"));
    this.index = uni.getStorageSync("index")||0;
    if (!uni.getStorageSync("index")) {
      uni.setStorageSync('index',this.index)  
    }
    this.getShopKa()
    // if(uni.getStorageSync('bottom')){
    // 	console.log(1);
    // 	this.$refs.popup.open('bottom')
    // 	uni.removeStorageSync('bottom')
    // }
  },
  methods: {
    goDaren (){
      uni.navigateTo({ url: '/pageA/index/daren' })
    },
    goMatrix(){
      uni.navigateTo({ url: '/pageA/index/matrix' })
    },
    async getShopKa(){
      uni.getStorageSync('shop').forEach(e=>{
       httpRequest('/api/getShopKa','POST',{
          businessId:uni.getStorageSync('business').businessId,
          shopId:e.shopId
      }).then(res=>{
        this.shopKaList = [...this.shopKaList,res.data]
      })
      })

    },
    filSrc(e){
      if(e.productName=='基础版'||!e.productName)return 'https://www.diandianyouke.site:801/fileDataBase/static/stag/static/img/bb_icon_jcban_jhuo.png'
      if(e.productName=='旗舰版')return 'https://www.diandianyouke.site:801/fileDataBase/static/stag/static/img/bb_icon_qjban_jhuo.png'
      if(e.productName=='专业版')return 'https://www.diandianyouke.site:801/fileDataBase/static/stag/static/img/bb_icon_zyban_jhuo.png'
    },
    noFilSrc(e){
      const noFilSrcArr = this.shopKaList.filter(item=>item[0].shopId == e.shopId)
      console.log(this.shopKaList[0][0].shopId);
      console.log(e.shopId);
      console.log(noFilSrcArr[0][0]);
      if(noFilSrcArr[0][0].productName=='基础版')return 'https://www.diandianyouke.site:801/fileDataBase/static/stag/static/img/bb_icon_jcban_gqi.png'
      if(noFilSrcArr[0][0].productName=='旗舰版')return 'https://www.diandianyouke.site:801/fileDataBase/static/stag/static/img/bb_icon_qjban_gqi.png'
      if(noFilSrcArr[0][0].productName=='专业版')return 'https://www.diandianyouke.site:801/fileDataBase/static/stag/static/img/bb_icon_zyban_gqi.png'
    },
    //恢复
    async draftRecover(){
      const res = await httpRequest("/api/findTaskStart", "POST", {
            businessId: uni.getStorageSync("business").businessId,
          });
          this.$refs.alertDialog.close()
          if(res.data.start==4){
            //服务端出错提示
            draftCancel()
            uni.showToast({title:'出错啦,请重试',icon:'error'})
          }
          if(res.data.type=='master2')return uni.navigateTo({ url: '/pageA/index/textVideo?master=2' })
          if(res.data.type=='smart')return uni.navigateTo({ url: `/pageA/index/IP?smart=3&index=${this.index}` })
          if(res.data.type=='oneClick')return uni.navigateTo({ url: `/pageA/index/IP?oneClick=3` })
          if(res.data.type=='master1')return uni.navigateTo({ url: `/pageA/index/IP?master=3` })
          if(res.data.type=='same')return uni.navigateTo({ url: `/pageA/index/IP?same=3` })
          if(res.data.type=='ori')return uni.navigateTo({ url: `/pageA/index/IP?Originality=3` })
          if(res.data.type=='pub')return uni.navigateTo({ url: `/pageA/index/textVideo?pub=3` })
          if(res.data.type=='pub1')return uni.navigateTo({ url: `/pageA/index/IP?pub=3` })
    },
    //取消
    async draftCancel(){
      //删除临时文件
    await httpRequest('/api/delStaging','POST',{
       businessId: uni.getStorageSync("business").businessId,
     })
     //删除任务
     await httpRequest('/api/delTask','POST',{
       taskId:uni.getStorageSync('taskId')
     })
     uni.removeStorageSync('copy')
     uni.removeStorageSync('maxNum')
     uni.removeStorageSync('time')
     uni.removeStorageSync('v1')
     uni.removeStorageSync('v2')
     uni.removeStorageSync('v3')
     uni.removeStorageSync('v4')
     uni.removeStorageSync('v5')
     uni.removeStorageSync('v6')
     uni.removeStorageSync('v7')
     uni.removeStorageSync('videoArr')
     uni.removeStorageSync('product')
     uni.removeStorageSync('taskId')
     uni.removeStorageSync('percent')
     uni.removeStorageSync('isSlice')
     uni.removeStorageSync('color')
     uni.removeStorageSync('font')
     uni.removeStorageSync('isCross')
     uni.removeStorageSync('voiceArr')
     uni.removeStorageSync('isItem')
     uni.removeStorageSync('templateId')
     uni.removeStorageSync('isSwitch ')
     uni.removeStorageSync('same')
     uni.removeStorageSync('sameTitle')
     uni.removeStorageSync('textList')
      uni.removeStorageSync('up')
      uni.removeStorageSync('num')
     this.$refs.alertDialog.close()
    },
    formatTimestamp (timestamp)  {
      const date = new Date(timestamp);
      const month = String(date.getMonth() + 1).padStart(2, '0');
      const day = String(date.getDate()).padStart(2, '0');
      const hours = String(date.getHours()).padStart(2, '0');
      const minutes = String(date.getMinutes()).padStart(2, '0');
      const formattedTime = `${month}/${day} ${hours}:${minutes}`;
      return formattedTime;
    },
    async masterClose(){
      this.$refs.masterCheck.close()
      if(!this.publicity){
        if(this.master==1)return uni.navigateTo({ url: '/pageA/index/IP?master=1' })
        if(this.master==2){
          const res = await httpRequest("/api/findTaskStart", "POST", {
              businessId: uni.getStorageSync("business").businessId,
            });
            if(!res.data){
              uni.navigateTo({ url: '/pageA/index/inputText?master=2' })
            }
            if(res.data){
              this.$refs.alertDialog.open()
            }
        }
      }else{
        if(this.master==1)return uni.navigateTo({ url: '/pageA/index/IP?publicity=1' })
      if(this.master==2){
        const res = await httpRequest("/api/findTaskStart", "POST", {
            businessId: uni.getStorageSync("business").businessId,
          });
          if(!res.data){
            uni.navigateTo({ url: '/pageA/index/inputText?publicity=2' })
          }
          if(res.data){
            this.$refs.alertDialog.open()
          }
      }
      }
    },
      masterChoose(e){
        uni.vibrateShort()
        this.master = e
      },
      masterBack(){
        this.$refs.masterCheck.close()
      },
    async goMaster(){
      if (!this.shopArr.length) return uni.navigateTo({ url: "/pageC/index/shop" });
      if (this.shopArr[this.index].ka) {
        if (this.shopArr[this.index].ka.state == 2) {
          uni.showLoading({
              title: '请稍后',
              mask: true
            })
            const res = await httpRequest("/api/findTaskStart", "POST", {
            businessId: uni.getStorageSync("business").businessId,
          });
          uni.hideLoading()
          if(res.data){
            this.datePopup = res.data.createDate
            if(res.data.start == 2)return uni.showToast({ title: "正在生成中,请稍后", icon: "none" });
          }
          // uni.removeStorageSync("state");
          //   uni.removeStorageSync("time");
          //   uni.removeStorageSync("percent");
          //   uni.removeStorageSync('isSlice')
          this.publicity = 0
          this.$refs.masterCheck.open()
        }
      } else {
        this.$refs.popupCenter.open("center");
      }
    },
    async goPublicity() {
      if (!this.shopArr.length) return uni.navigateTo({ url: "/pageC/index/shop" });
      if (this.shopArr[this.index].ka) {
        if (this.shopArr[this.index].ka.state == 2) {
          uni.showLoading({
              title: '请稍后',
              mask: true
            })
            const res = await httpRequest("/api/findTaskStart", "POST", {
            businessId: uni.getStorageSync("business").businessId,
          });
          uni.hideLoading()
          if(res.data){
            this.datePopup = res.data.createDate
            if(res.data.start == 2)return uni.showToast({ title: "正在生成中,请稍后", icon: "none" });
          }
          this.publicity = 1
          this.$refs.masterCheck.open()
        }
      } else {
        this.$refs.popupCenter.open("center");
      }
    },
    async goOneClick() {
      if (!this.shopArr.length) return uni.navigateTo({ url: "/pageC/index/shop" });
      if (this.shopArr[this.index].ka) {
        if (this.shopArr[this.index].ka.state == 2) {
          uni.showLoading({
              title: '请稍后',
              mask: true
            })
            const res = await httpRequest("/api/findTaskStart", "POST", {
            businessId: uni.getStorageSync("business").businessId,
          });
          uni.hideLoading()
          if(res.data){
            
            if(res.data.start == 2)return uni.showToast({ title: "正在生成中,请稍后", icon: "none" });
          }
          uni.navigateTo({ url: '/pageA/index/IP?oneClick=1' })
        }
      } else {
        this.$refs.popupCenter.open("center");
      }
    },
    async goOriginality() {
      if (!this.shopArr.length) return uni.navigateTo({ url: "/pageC/index/shop" });
      if (this.shopArr[this.index].ka) {
        if (this.shopArr[this.index].ka.state == 2) {
          uni.showLoading({
              title: '请稍后',
              mask: true
            })
            const res = await httpRequest("/api/findTaskStart", "POST", {
            businessId: uni.getStorageSync("business").businessId,
          });
          uni.hideLoading()
          if(res.data){
            if(res.data.start == 2)return uni.showToast({ title: "正在生成中,请稍后", icon: "none" });
          }
          // if(res.data&&uni.getStorageSync('isCross')==2)return uni.showToast({ title: "创意视频不能使用横屏视频素材", icon: "none" });
          uni.navigateTo({ url: '/pageA/index/IP?Originality=1' })
        }
      } else {
        this.$refs.popupCenter.open("center");
      }
    },
    async goCut(){
      if (!this.shopArr.length) return uni.navigateTo({ url: "/pageC/index/shop" });
      if (this.shopArr[this.index].ka) {
        if (this.shopArr[this.index].ka.state == 2) {
          uni.showLoading({
              title: '请稍后',
              mask: true
            })
            const res = await httpRequest("/api/findTaskStart", "POST", {
            businessId: uni.getStorageSync("business").businessId,
          });
          uni.hideLoading()
          if(res.data){
            
            if(res.data.start == 2)return uni.showToast({ title: "正在生成中,请稍后", icon: "none" });
          }
          uni.navigateTo({ url: '/pageA/index/cut' })
        }
      } else {
        this.$refs.popupCenter.open("center");
      }
      
    },
    getRecord(i){
      this.$refs.inputDialog.open()
      this.i = i
      this.isRecord = true
    },
    async dialogInputConfirm(e){
      console.log(this.kaMi);
      if(this.isRecord){
        const res = await httpRequest('/api/shopRenewal','POST',{
        shopId:this.shopArr[this.i].shopId,
        kaMi:this.kaMi
      })
      this.kaMi=''
      if(res.code=='0'){
        uni.showToast({title:'续费成功',icon:'none'})
        this.getShop()
      }else{
        uni.showToast({title:'卡密无效或已被使用',icon:'none'})
      }
      }else{
        const res = await httpRequest('/api/shopRenewal','POST',{
        shopId:this.shopArr[this.index].shopId,
        kaMi:this.kaMi
      })
      this.kaMi=''
      if(res.code=='0'){
        uni.showToast({title:'续费成功',icon:'none'})
        this.getShop()
      }else{
        uni.showToast({title:'卡密无效或已被使用',icon:'none'})
      }
      }
      this.isRecord = false
    },
    getExpired1(index){
      //判断卡是否过期（过期为空）1：已过期 2：三天后到期 3：余额不足50次
      if (!this.shopArr[index].ka)return 1
      //判段是否3天后到期或者余额不足50次
      const threeDaysLater = new Date(this.currentTime + this.millisecondsPerDay*3).getTime();
      if(this.shopArr[index].ka.endDate<threeDaysLater)return 2
      if(this.shopArr[index].ka.useNum<50)return 3
      // return this.isExpired = 0
    },
    //判断当前店铺是否过期 
    getExpired(index){
      //判断卡是否过期（过期为空）1：已过期 2：三天后到期 3：余额不足50次
      if (!this.shopArr[Number(index)].ka)return this.isExpired = 1
      //判段是否3天后到期或者余额不足50次
      const threeDaysLater = new Date(this.currentTime + this.millisecondsPerDay*3).getTime();
      if(this.shopArr[Number(index)].ka.endDate<threeDaysLater)return this.isExpired = 2
      if(this.shopArr[Number(index)].ka.useNum<50)return this.isExpired = 3
      return this.isExpired = 0
    },
    //授权绑定
    bind(){
      uni.pageScrollTo({
      	scrollTop: -100
      });
      this.$refs.bind.open()
    },
    //资料素材
    material(){
      if (!this.shopArr.length) return uni.navigateTo({ url: "/pageC/index/shop" });
      uni.navigateTo({ url: '/pageA/index/material' })
    },
    async bindConfirm(e){
      if(!this.code)return uni.showToast({title:'输入不能为空',icon:'none'})
      if(this.code==uni.getStorageSync('code'))return uni.showToast({title:'不能绑定自己的店铺',icon:'none'})
      const res = await httpRequest('/api/shopEmpower','POST',{
        code:this.code,
        businessId:uni.getStorageSync('business').businessId
      })
      console.log(res);
      this.code = ''
      if(res.code==0)return uni.showToast({title:'授权成功',icon:'none'})
      if(res.code!=0)return uni.showToast({title:'授权失败',icon:'none'})
    },
    //顾客推
   async goPush() {
    if (!this.shopArr.length) return uni.navigateTo({ url: "/pageC/index/shop" });
    uni.showLoading({
      title: '请稍后',
      mask: true
    })
      const res = await httpRequest("/api/taskListByShopId", "POST", {
    shopId: uni.getStorageSync('shop')[this.index].shopId,
  });
  uni.hideLoading()
  if(res.data.length==0)return uni.showToast({
    title: '请先创建任务',
    icon: 'none'
  })
      uni.navigateTo({ url: `/pageA/index/push?id=${this.shopArr[this.index].shopId}`});
    },
    goService() {
      uni.navigateTo({ url: "/pageB/index/service" });
    },

    //登录获取openId
    getlogin() {
      uni.login({
        success: async (result) => {
          console.log(result);
          result.code;
          const res = await httpRequest("/api/WeChatLogin", "POST", {
            code: result.code,
          });
          console.log(res);
          uni.setStorageSync("token", res.data.token);
          uni.setStorageSync("business", res.data.business);
          this.getShop();
        },
        fail: (error) => {
          console.log(error);
        },
      });
    },
    //隐私协议
    gotoprivacy() {
      uni.navigateTo({ url: "/pageC/index/privacy" });
    },
    //用户协议
    gotoAgreeMent() {
      uni.navigateTo({ url: "/pageC/index/agreement" });
    },
    //关闭弹窗
    closePopup() {
      this.$refs.popup.close();
      this.$refs.popup1.close();
      this.$refs.popupCenter.close();
    },
    delmask() {
      this.mask = false;
    },
    //弹窗改变
    popupChange(e) {
      this.show = e.show
      if (e.show) return uni.hideTabBar();
      if (!e.show) return uni.showTabBar();
      
    },
    popupChange1(e) {
      if (e.show) {
        this.getPayInfo();
        this.getOpenId();
        console.log(this.openId);
        setTimeout(() => {
          this.getPerpaySignature();
        }, 1000);
        uni.hideTabBar();
      }
      if (!e.show) return uni.showTabBar();
    },
    gotoSetpBar() {
      uni.navigateTo({ url: "/pageC/index/setpBar1" });
    },
    //请求函数
    async getIndexAPI() {
      const res = await httpRequest("/api/getPlatformDataOne", "POST");
      console.log(res);
      this.data = res.data;
      console.log(this.data);
    },
    manageBtn() {
      uni.navigateTo({url: `/pageB/index/management?shopArr=${JSON.stringify(this.shopArr)}`,});
      this.$refs.popup.close();
      this.$refs.popup1.close();
    },
    verifyBtn() {
      if(this.index1!==''){
        console.log(this.index);
      this.index = this.index1
      }
      
      if((uni.getStorageSync('index')!=this.index)&&uni.getStorageSync('taskId')){
        uni.showModal({
          title: '提示',
          content: '当前操作会删除草稿,是否继续?',
          success: async(res) => {
            console.log(res);
            if(res.confirm){
              uni.showLoading({
        title: '请稍后',
        mask: false
      })
        await httpRequest('/api/delStaging','POST',{
        businessId: uni.getStorageSync("business").businessId,
        })
        await httpRequest('/api/delTask','POST',{
          taskId:uni.getStorageSync('taskId')
        })
        uni.hideLoading()
        uni.removeStorageSync('copy')
        uni.removeStorageSync('maxNum')
        uni.removeStorageSync('time')
        uni.removeStorageSync('v1')
        uni.removeStorageSync('v2')
        uni.removeStorageSync('v3')
        uni.removeStorageSync('v4')
        uni.removeStorageSync('v5')
        uni.removeStorageSync('v6')
        uni.removeStorageSync('v7')
        uni.removeStorageSync('videoArr')
        uni.removeStorageSync('product')
        uni.removeStorageSync('taskId')
        uni.removeStorageSync('percent')
        uni.removeStorageSync('isSlice')
        uni.removeStorageSync('color')
        uni.removeStorageSync('font')
        uni.removeStorageSync('same')
        uni.removeStorageSync('sameTitle')
        uni.removeStorageSync('voiceArr')
        uni.removeStorageSync('isItem')
        uni.removeStorageSync('templateId')
        uni.removeStorageSync('isSwitch ')

        this.shopText = this.shopArr[Number(this.index)].shopName;
        uni.setStorageSync("index", this.index);
        uni.setStorageSync("shopText", this.shopText);
        this.shopId = this.shopArr[Number(this.index)].shopId;
        this.$refs.popup1.close();
        console.log(this.shopId);
        this.getExpired(this.index)
        console.log(this.isExpired);
            }else if(res.cancel){
              return this.index = uni.getStorageSync('index')
            }
          },
        })

      }else{
        console.log(this.index);
        this.shopText = this.shopArr[Number(this.index)].shopName;
        uni.setStorageSync("index", this.index);
      uni.setStorageSync("shopText", this.shopText);
      this.shopId = this.shopArr[Number(this.index)].shopId;
      this.$refs.popup1.close();
      console.log(this.shopId);
      this.getExpired(this.index)
      console.log(this.isExpired);     
     }
      
    },
    radioChange: function (evt) {
      console.log(evt.detail.value);
      this.index1 = evt.detail.value;

      // for (let i = 0; i < this.shopArr.length; i++) {
      // 	console.log(this.shopArr[i].shopId);
      //     if (this.shopArr[i].shopId === evt.detail.value) {
      //         this.current = i;
      // 		console.log(this.current);
      //         break;
      //     }
      // }
    },
    //跳转页面
    async gotoIP(type) {
      console.log(this.isProcessingClick);
      if (this.isProcessingClick) {
        return;
      }
      this.isProcessingClick=true
      setTimeout(() => {
        this.isProcessingClick = false
      }, 1500);
      if (this.shopArr[this.index]) {
        if (this.shopArr[this.index].ka) {
          if (this.shopArr[this.index].ka.state == 2) {
            uni.showLoading({
              title: '请稍后',
              mask: true
            })
            const res = await httpRequest("/api/findTaskStart", "POST", {
            businessId: uni.getStorageSync("business").businessId,
          });
          uni.hideLoading()
          if(res.data){
            if(res.data.start == 2)return uni.showToast({ title: "正在生成中,请稍后", icon: "none" });
          }
            // uni.removeStorageSync("state");
            // uni.removeStorageSync("time");
            // uni.removeStorageSync("percent");
            // uni.removeStorageSync('isSlice')
            // uni.removeStorageSync('product')
            // uni.removeStorageSync('videoArr')
            // uni.removeStorageSync('v1')
            // uni.removeStorageSync('v2')
            // uni.removeStorageSync('v3')
            // uni.removeStorageSync('v4')
            // uni.removeStorageSync('v5')
            // uni.removeStorageSync('v6')
            // uni.removeStorageSync('v7')
            uni.navigateTo({
              url: `/pageA/index/IP?index=${this.index}`,
            });
            
          } else {
            uni.navigateTo({ url: "/pageC/index/shop" });
            
          }
        } else {
          uni.navigateTo({ url: "/pageC/index/shop" });
          
        }
      } else {
        uni.navigateTo({ url: "/pageC/index/shop" });
        
      }
    },
    async goToIP(index) {
      //判断是否登录
      // if(!uni.getStorageSync('token')){
      // 	uni.navigateTo({ url: '/pages/login/login' })
      // 	return
      // }
      // if(this.shopArr[index].state == 2) return uni.navigateTo({url:`/pageB/index/pay?businessId=${this.shopArr[index].business.businessId}&shopId=${this.shopArr[index].shopId}`})
      if (!this.shopArr.length) return uni.navigateTo({ url: "/pageC/index/shop" });
      if (this.shopArr[this.index].ka) {
        if (this.shopArr[this.index].ka.state == 2) {
          uni.showLoading({
              title: '请稍后',
              mask: true
            })
            const res = await httpRequest("/api/findTaskStart", "POST", {
            businessId: uni.getStorageSync("business").businessId,
          });
          uni.hideLoading()
          if(res.data){
            if(res.data.start == 2)return uni.showToast({ title: "正在生成中,请稍后", icon: "none" });
          }
          // uni.removeStorageSync("state");
          //   uni.removeStorageSync("time");
          //   uni.removeStorageSync("percent");
          //   uni.removeStorageSync('isSlice')
          uni.navigateTo({
            url: `/pageA/index/IP?index=${this.index}`,
          });
        }
      } else {
        this.$refs.popupCenter.open("center");
      }
    },
    goToShop() {
      //判断是否登录
      // if(!uni.getStorageSync('token')){
      // 	uni.navigateTo({ url: '/pages/login/login' })
      // 	return
      // }
      uni.navigateTo({ url: "/pageC/index/shop" });
      this.$refs.popup.close();
      this.$refs.popup1.close();
    },
    gotoVideos() {
      //判断是否登录
      // if(!uni.getStorageSync('token')){
      // 	uni.navigateTo({ url: '/pages/login/login' })
      // 	return
      // }
      console.log(this.shopId);
      console.log(this.index);
      uni.navigateTo({
        url: `/pageA/index/videos?shopId=${this.shopId}&index=${this.index}`,
      });
    },
    gotoMap() {
      uni.navigateTo({
        url: "/pageA/index/map",
      });
    },
    pullMenu() {
      if(!this.shopArr.length)return uni.navigateTo({ url: "/pageC/index/shop" });
      // 	if(!uni.getStorageSync('token')){
      // 	uni.navigateTo({ url: '/pages/login/login' })
      // 	return
      // }
      if (!uni.getStorageSync("shop"))
        return uni.navigateTo({ url: "/pageC/index/shop" });
      this.isMenu = false;
      // open 方法传入参数 等同在 uni-popup 组件上绑定 type属性
      this.$refs.popup1.open("bottom");
    },
    //获取店铺
    async getShop() {
      const res = await httpRequest("/api/shopByBusinId", "POST", {
        businessId: uni.getStorageSync("business").businessId,
      });
      const res1 = await httpRequest('/api/empowerShopByBusinId','POST',{
        businessId: uni.getStorageSync("business").businessId,
      })
      console.log(res1);
      const accreditList = res1.data
      accreditList.forEach(e=>e.isAccredit = true)
      console.log(accreditList);
      if (res.error) return;
      this.skeleton = false;
      console.log(res);
      // if(res.data.length<1){
      // 	return uni.navigateTo({ url: '/pageC/index/shop' })
      // }
      this.shopArr = [...res.data,...accreditList];
      if (res.data.length != 0) {
        this.shopId = res.data[0].shopId;
        if (!uni.getStorageSync("shopText")) this.shopText = res.data[0].shopName;
        console.log(this.shopText);
      }
      uni.setStorageSync("shop", this.shopArr);
      this.getExpired(this.index)
    //   console.log(this.shopArr);
    //   console.log(Math.floor((this.shopArr[this.index].ka.endDate - this.currentTime)/this.millisecondsPerDay));
    // console.log(this.shopArr[this.index].ka.endDate);
    // console.log(this.currentTime);
    },
    timestamp2Time(time) {
      // 使用Date对象将时间戳转换为日期对象
      const date = new Date(time);

      // 获取日期的各个部分，如年、月、日、时、分、秒
      const year = date.getFullYear(); // 年
      const month = date.getMonth() + 1; // 月 (注意月份从0开始，需要加1)
      const day = date.getDate(); // 日
      const hours = date.getHours(); // 时
      const minutes = date.getMinutes(); // 分
      const seconds = date.getSeconds(); // 秒

      // 构建日期字符串，例如：2022-10-08 14:30:00
      const formattedDate = `${year}-${month
        .toString()
        .padStart(2, "0")}-${day.toString().padStart(2, "0")} ${hours
        .toString()
        .padStart(2, "0")}:${minutes
        .toString()
        .padStart(2, "0")}:${seconds.toString().padStart(2, "0")}`;
      const ymdData = `${year}-${month
        .toString()
        .padStart(2, "0")}-${day.toString().padStart(2, "0")}`; // 输出格式化后的日期字符串
      return ymdData;
    },
    checkedBox(e) {
      this.checked = e.detail.value[0];
    },
    //获取签名
    async getPerpaySignature() {
      console.log(this.price);
      const res = await httpRequest("/api/getPerpaySignature", "POST", {
        method: "POST",
        url: "https://api.mch.weixin.qq.com/v3/pay/transactions/jsapi",
        body: JSON.stringify({
          appid: "wx92552bbbe59dc59b",
          mchid: "1656084688",
          description: this.description,
          out_trade_no: this.orderNum,
          notify_url: "https://www.diandianyouke.cn:8088/api/orderResult",
          amount: { total: this.price },
          payer: { openid: this.openId },
        }),
      });
      console.log(res);
      this.signature = res.data;
    },
    //获取openId
    getOpenId() {
      uni.getProvider({
        service: "oauth",
        success: ({ service, provider }) => {
          uni.login({
            provider: provider,
            success: async (res) => {
              console.log(res.code);
              const res1 = await httpRequest("/api/jscode2session", "POST", {
                code: res.code,
              });
              console.log(res1);
              console.log(JSON.parse(res1.data));
              this.openId = JSON.parse(res1.data).openid;
              uni.setStorageSync("openid", JSON.parse(res1.data).openid);
              // uni.request({
              //   url: 'https://api.weixin.qq.com/sns/jscode2session',
              //   data: {
              //       appid:'wx92552bbbe59dc59b',
              //       secret:'77cbbbf2b05b0912c13cd8dacb8be296',
              //       js_code:res.code,
              //       grant_type:'authorization_code'
              //       },
              //   header: {
              //     Accept: 'application/json',
              //     'Content-Type': 'application/json',
              //     'X-Requested-With': 'XMLHttpRequest'
              //   },
              //   method: 'GET',
              //   sslVerify: true,
              //   success: ({ data, statusCode, header }) => {
              //     console.log(data);
              //     this.openId = data.openid
              //     uni.setStorageSync('openid',data.openid)
              //   },
              //   fail: (error) => {}
              // })
            },
          });
        },
        fail: (error) => {},
      });
    },
    //获取订单信息
    async getPayInfo() {
      const res = await httpRequest("/api/paymentInfo", "POST", {});
      console.log(res);
      this.price = res.data.price;
      this.description = res.data.description;
      this.orderNum = res.data.orderNum;
      this.productId = res.data.productId;
    },
    //获取预支付和下单
    placeOlder() {
      console.log("支付金额");
      console.log(this.price);
      if (this.checked != "cb")
        return uni.showToast({ title: "请先勾选协议", icon: "none" });
      uni.request({
        url: "https://api.mch.weixin.qq.com/v3/pay/transactions/jsapi",
        method: "POST",
        header: {
          Authorization: `WECHATPAY2-SHA256-RSA2048 ${this.signature},`,
          Accept: "application/json",
          "Content-Type": "application/json",
        },
        data: JSON.stringify({
          appid: "wx92552bbbe59dc59b",
          mchid: "1656084688",
          description: this.description,
          out_trade_no: this.orderNum,
          notify_url: "https://www.diandianyouke.cn:8088/api/orderResult",
          amount: { total: this.price },
          payer: { openid: this.openId },
        }),
        success: async (res) => {
          console.log(res);
          const res1 = await httpRequest("/api/getZFPageSignature", "POST", {
            appId: "wx92552bbbe59dc59b",
            prepayId: `prepay_id=${res.data.prepay_id}`,
          });
          console.log(res1);

          uni.requestPayment({
            provider: this.provider,
            orderInfo: {
              description: this.description,
              price: this.price,
              orderNum: this.orderNum,
            },
            timeStamp: res1.data.timeStamp.toString(),
            nonceStr: res1.data.nonceStr,
            package: `prepay_id=${res.data.prepay_id}`,
            signType: "RSA",
            paySign: res1.data.paySign,
            success: async (res2) => {
              console.log(res2);
              const res3 = await httpRequest("/api/getOrderInfo", "POST", {
                orderNumber: this.orderNum,
                shopId: this.shopId,
                businessId: this.businessId,
                productId: this.productId,
              });
              console.log(res3);
              if (!res3.success)
                return uni.showToast({
                  title: "支付取消",
                  icon: "none",
                });
              //提示用户
              uni.showToast({
                title: "支付成功",
                icon: "success",
                mask: true,
              });
              //跳转页面
              uni.reLaunch({ url: "/pages/index/index" });
            },
            fail: (error) => {
              console.log(error);
              uni.showToast({
                title: "支付取消",
                icon: "none",
              });
            },
          });
        },
      });
    },
    onOrderPay() {
      //获取服务提供商
      uni.getProvider({
        service: "payment",
        success: (res) => {
          console.log(res);
          this.provider = res.provider[0];
        },
        fail: (error) => {
          console.log(error);
        },
      });
      this.placeOlder();
    },
    formatNumber(num, e) {
      if (num > 100000000) {
        if (e == 1) {
          this.unit1 = "亿";
        } else if (e == 2) {
          this.unit2 = "亿";
        } else {
          this.unit3 = "亿";
        }
        return (num / 100000000).toFixed(1);
      } else if (num > 10000000) {
        if (e == 1) {
          this.unit1 = "千万";
        } else if (e == 2) {
          this.unit2 = "千万";
        } else {
          this.unit3 = "千万";
        }
        return (num / 10000000).toFixed(1);
      } else if (num > 1000000) {
        if (e == 1) {
          this.unit1 = "百万";
        } else if (e == 2) {
          this.unit2 = "百万";
        } else {
          this.unit3 = "百万";
        }
        return (num / 1000000).toFixed(1);
      } else if (num >= 10000) {
        if (e == 1) {
          this.unit1 = "万";
        } else if (e == 2) {
          this.unit2 = "万";
        } else {
          this.unit3 = "万";
        }
        return (num / 10000).toFixed(1);
      } else {
        this.num = "";
        return num;
      }
    },
  },
  computed: {
    formattedDate(timestamp) {
      // 使用 format 函数将时间戳转换为年月日格式
      //   console.log(timestamp);
      //   return format(new Date(timestamp), 'yyyy-MM-dd');
    },
  },
};
const changeTab = (e) => {
  console.log(e);
  current.value = e;
};

//查询商户店铺
</script>
<style lang="scss" scoped>
@font-face {
  font-family: 'MiSans';
  src: url('../../fonts/MiSans-Bold.ttf') format('truetype');
  /* 添加其他字体格式（如woff、woff2等）以提供更好的兼容性 */
}
.mengban {
  position: fixed;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  z-index: 999;
  .yindao {
    position: absolute;
    top: 165rpx;
    right: 7rpx;
    width: 572rpx;
    height: 800rpx;
    transform: translateX(-435rpx);
  }
}
.content {
  width: 100%;
  min-height: 100vh;
  background-color: rgb(246,248,251);
  position: relative;

  .header {
    position: relative;
    width: 100%;
    height: 130rpx;
    text-align: center;
    padding-top: 36rpx;
    font-size: 33rpx;
    background-color: #fff;
    .map {
      position: absolute;
      top: 36rpx;
      left: 35rpx;
      height: 35rpx;
      width: 110rpx;
      font-size: 26rpx;

      .dizhi {
        display: flex;
        justify-content: space-around;
        width: 200rpx;
      }
      image {
        color: #3f403d;
        width: 50rpx;
      }
      .map-icon {
        height: 35rpx;
        display: inline-block;
      }
      .map-desc {
        width: 200rpx;
        font-size: 26rpx;
      }
    }
    // .header-left{
    // 	margin-left: 16rpx;
    // 	width: 500rpx;
    // 	height: 80rpx;
    // 	// background-color: pink;
    // 	.icon{
    // 		width: 222rpx;
    // 		height: 80rpx;
    // 		// margin: 60rpx 68rpx 16rpx 14rpx;
    // 	}
    // }
  }
  .pages {
    padding: 32rpx;
    // .map{
    // 	width: 100%;
    // 	height: 72rpx;
    // 	background-color: #fff;
    // 	display: flex;
    // 	justify-content: center;
    // 	line-height: 72rpx;
    // 	align-items: center;
    // 	margin-top: 24rpx;
    // 	.map-icon{
    // 		width: 40rpx;
    // 		height: 40rpx;
    // 	}
    // 	.map-desc{
    // 		font-size: 28rpx;
    // 		margin-left: 12rpx;
    // 		color: #303030 ;
    // 	}
    // }
    .index-bgi {
      position: absolute;
      top: 0;
      left: 0;
      width: 100%;
      height: 648rpx;
    }
    .data {
      // width: 686rpx;
      box-sizing: border-box;
      position: absolute;
      top: 546rpx;
      left: 30rpx;
      height: 234rpx;
      width: 690rpx;
      background-color: rgba(255, 255, 255, 0.95);
      padding: 30rpx 24rpx;
      border-radius: 24rpx;
      margin-bottom: 40rpx;
      border: 2rpx solid #fff;
      box-shadow: 0 6rpx 40rpx rgba(200,138,255,0.2);
      .data-top {
        display: flex;
        justify-content: space-between;
        align-items: center;
        font-size: 24rpx;
        color: rgba(144, 147, 153, 1);
        // .today {
        //   width: 184rpx;
        //   height: 64rpx;
        //   font-size: 28rpx;
        //   color: rgba(142,84,244,1);
        //   text-align: center;
        //   line-height: 64rpx;
        //   border-radius: 340rpx;
        //   border: 1px solid rgba(142,84,244,0.1);
        // }
      }
      .data-bottom {
        width: 100%;
        height: 144rpx;
        display: flex;
        align-items: center;
        justify-content: space-between;
        .data-bottom-item {
          width: 197rpx;
          height: 114rpx;
          display: flex;
          flex-direction: column;
          justify-content: space-between;
          align-items: center;
          font-size: 24rpx;
          color: rgb(144,147,153);
          font-weight: 400;
          .h1 {
            font-family: 'MiSans', sans-serif;;
            color: rgba(115, 48, 230);
            font-size: 40rpx;
            font-weight: 700;
          }
        }
      }
      // .date-title{
      // 	display: flex;
      // 	justify-content: space-around;
      // 	padding-top: 24rpx;
      // 	.item{
      // 		display: flex;
      // 		flex-direction: column;
      // 		align-items: center;
      // 		.line{
      // 			width: 48rpx;
      // 			height: 8rpx;
      // 			background: linear-gradient(#e4fcff,#c4deff,#c0efff);
      // 			margin-top: 4rpx;
      // 			border-radius: 4rpx;
      // 		}
      // 		.item-desc{
      // 			font-size: 24rpx;
      // 			color: #101010;
      // 		}
      // 		.item-desc-active{
      // 			font-size: 24rpx;
      // 			color: #101010;
      // 			font-weight: 600;
      // 		}
      // 	}
    }
    .tap {
      width: 690rpx;
      height: 70rpx;
      display: flex;
      justify-content: space-around;
      align-items: center;
      margin-top: 25rpx;
      margin-left: 30rpx;
      background-color: #ebeef0;
      border-radius: 25rpx;
      font-size: 24rpx;
      .active {
        width: 113rpx;
        height: 60rpx;
        background-color: #fff;
        font-weight: 600;
        border-radius: 30rpx;
        text-align: center;
        line-height: 60rpx;
      }
    }
    .status {
      width: 100%;
      height: 200rpx;
      background-color: #fff;
      margin-top: 24rpx;
      border-radius: 20rpx;
      display: flex;
      justify-content: space-around;

      .swiper {
        height: 200rpx;
        width: 100%;
        .lists {
          display: flex;
          .swiper-item {
            // display: block;
            height: 200rpx;
            width: 100%;
            text-align: center;
          }
          .list {
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: space-around;
            width: 33%;
            .listDesc {
              font-size: 28rpx;
              color: #000;
              margin-top: 16rpx;
            }
            .listCount {
              font-size: 56rpx;
              color: #000;
              margin-bottom: 16rpx;
            }
          }
        }
      }
    }
  }
  .notice {
    width: 100%;
    height: 80rpx;
    background-color: #fff;
    margin-top: 24rpx;
    border-radius: 12rpx;
    display: flex;
    align-items: center;
    .notice-icon {
      width: 40rpx;
      height: 40rpx;
      margin-left: 20rpx;
      margin-right: 8rpx;
    }
    .notice-desc {
      color: #101010;
      font-size: 28rpx;
    }
  }
  .content-bottom {
    width: 100%;
    position: absolute;
    top: 820rpx;
    left: 0;
    background-color: rgb(246,248,251);
    border-radius: 48rpx 48rpx 0 0;
    padding: 30rpx;
    padding-top: 0;
    box-sizing: border-box;
    .feature {
      border-radius: 24rpx;
      background-color: #fff;
      padding: 0 30rpx 36rpx;
      box-sizing: border-box;
      .guoqi{
        width: 100%;
        height: 84rpx;
        border-radius: 24rpx 24rpx 0 0;
        background-color: rgb(249,249,249);
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 0 30rpx;
        transform: translateX(-30rpx);
        .guoqi-left{
          display: flex;
          align-items: center;
          font-size: 24rpx;
          color: rgb(69,70,74);
          margin-right: 30rpx;
        }
        .guoqi-right{
          font-size: 24rpx;
          color: rgb(69,70,74);
          .renew{
            font-size: 28rpx;
            color: rgb(142, 84, 244);
            font-weight: 500;
          }
        }
      }
      .shop-choose {
        display: inline-block;
        box-sizing: border-box;
        max-width: 400rpx;
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        height: 60rpx;
        background-color: rgb(249,249,249);
        border-radius: 25rpx;
        font-size: 28rpx;
        padding: 0 24rpx;
        color: rgb(48, 49, 51);
        margin-top: 36rpx;
        .shop-img {
          width: 32rpx;
          height: 32rpx;
          margin-right: 6rpx;
        }
        .pull-choose {
          position: absolute;
          top: 55rpx;
          left: 10rpx;
          width: 210rpx;
          background-color: #fff;
          z-index: 999;
          border-radius: 20rpx 20rpx 0 0;
          .pull-menu {
            width: 210rpx;
            height: 50rpx;
            text-align: center;
            line-height: 45rpx;
          }
        }
      }
      .video {
        display: flex;
        width: 100%;
        margin-top: 15rpx;
        justify-content: space-between;
        .view-item {
          width: 330rpx;
          height: 144rpx;
          // background-color: #fff;
          background-color: #fff;
          display: flex;
          align-items: center;
          justify-content: center;
          border-radius: 24rpx;
          .ip {
            width: 72rpx;
            height: 72rpx;
            margin-right: 22rpx;
          }
          .ip-desc {
            .top {
              color: rgb(69, 70, 74);
              font-size: 32rpx;
              font-weight: 500;
            }
            .bottom {
              font-size: 24rpx;
              color: rgb(144, 147, 153);
              margin-top: 4rpx;
            }
          }
        }
      }
      .small {
        display: flex;
        flex-wrap: wrap;
        margin-top: 30rpx;
        .bind {
          width: 96rpx;
          height: 112rpx;
          display: flex;
          flex-direction: column;
          align-items: center;
          font-size: 24rpx;
          color: rgb(69, 70, 74);
          margin-right: 78rpx;
          margin-bottom: 30rpx;
          &:nth-child(4n){
            margin-right: 0 !important;
          }
        }
      }
    }
    .setbar {
      width: 690rpx;
      margin-top: 30rpx;
      border-radius: 24rpx;
    }
  }

  .source {
    width: 100%;
    margin-top: 24rpx;
    .video-source {
      width: 100%;
      height: 46rpx;
      display: flex;
      align-items: center;
      .v-line {
        width: 12rpx;
        height: 40rpx;
        background: linear-gradient(#e4fcff, #c4deff, #c0efff);
        border-radius: 40rpx;
        margin-right: 8rpx;
      }
      .source-desc {
        display: flex;
        justify-content: space-between;
        width: 689rpx;
        height: 73rpx;
        background-color: #ececec;
        color: #101010;
        font-size: 32rpx;
        font-weight: 600;
        padding: 5rpx;
        border-radius: 30rpx;
        .video-material {
          width: 265rpx;
          height: 58rpx;
          text-align: center;
          line-height: 58rpx;
          border-radius: 30rpx;
        }
      }
      .active-class {
        background: linear-gradient(to bottom right, #0075f4, #38adff);
        color: #fff;
        font-weight: 800;
      }
    }
    .video-item {
      display: flex;
      justify-content: space-between;
      width: 100%;
      flex-wrap: wrap;
      .video-list {
        width: calc(50% - 20rpx);
        background-color: #fff;
        margin-top: 24rpx;
        overflow: hidden;
        border-radius: 20rpx;
        .goods-icon {
          width: 100%;
          height: 352rpx;
        }
        .goods-bottom {
          margin-top: 14rpx;
          margin-left: 18rpx;
          padding-bottom: 14rpx;
          .goods-title {
            color: #101010;
            font-size: 32rpx;
            font-weight: 600;
          }
          .goods-desc {
            color: #8d8d8d;
            font-size: 28rpx;
          }
          .detail {
            display: flex;
            justify-content: space-between;
            margin-top: 4rpx;
            .goods-left {
              display: flex;
              .name-icon {
                width: 40rpx;
                height: 40rpx;
              }
              .name {
                font-size: 24rpx;
                color: #8d8d8d;
                margin-left: 8rpx;
              }
            }
            .goods-right {
              display: flex;
              .name-icon {
                width: 40rpx;
                height: 40rpx;
              }
              .name {
                font-size: 24rpx;
                color: #8d8d8d;
                margin-right: 24rpx;
                margin-left: 8rpx;
              }
            }
          }
        }
      }
    }
  }
}
.popup-content {
  position: relative;
  height: 1000rpx;
  background-color: rgb(246, 248, 251);
  border-radius: 32rpx 32rpx 0 0 !important;

  .text {
    
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 108rpx;
    width: 100%;
    border-bottom: 1px solid rgba(220, 223, 230, 1);
    padding: 30rpx;
    color: rgb(48, 49, 51);
    font-weight: 700;
  }
  .fixed {
    display: flex;
    justify-content: center;
    position: fixed;
    bottom: 0;
    left: 0;
    height: 147rpx;
    width: 100%;
    border-top: 1rpx solid #e5e7ec;
    background-color: #fff;
    padding-top: 6rpx;

    .verifyBtn {
      width: 690rpx;
      height: 86rpx;
      background-color: #8e54f4;
      color: #fff;
      text-align: center;
      line-height: 86rpx;
      font-size: 30rpx;
      margin: 0;
      margin-left: 18rpx;
    }
    .manageBtn {
      width: 336rpx;
      height: 84rpx;
      border: 1px solid #8e54f4;
      color: #8e54f4;
      background-color: #fff;
      text-align: center;
      line-height: 84rpx;
      font-size: 30rpx;
      margin: 0;
    }
  }
  .popup-bottom1 {
    overflow-y: scroll;
    height: 787rpx;
    padding-left: 30rpx;
    padding-top: 6rpx;
    padding-right: 30rpx;
    .popup-bottom-label {
      display: flex;
      align-items: center;
      // width: 686rpx;
      margin-top: 24rpx;

      .popup-bottom-lift {
        background-color: #fff;
        border-radius: 16rpx;
        padding-left: 30rpx;
        margin-left: 24rpx;
        padding: 30rpx;
        width: 618rpx;
        box-sizing: border-box;
        .record{
          display: flex;
          justify-content: space-between;
          align-items: center;
          font-size: 28rpx;
          color: rgb(144,147,153);
          margin-bottom: 30rpx;
        }
        .box{
        display: flex;
        align-items: center;
        font-size: 28rpx;
        color: rgba(48, 49, 51, 1);
        font-weight: 700;
        }
        .try-text {
          font-size: 24rpx;
          color: rgb(144, 147, 153);
          font-weight: normal;
        }
      }
    }
  }
  .popup-bottom {
    overflow-y: scroll;
    height: 787rpx;
    padding-left: 30rpx;
    .popup-bottom-box {
      display: flex;
      align-items: center;
      justify-content: space-between;
      width: 686rpx;
      height: 126rpx;
      margin-top: 20rpx;

      .popup-bottom-lift {
        display: flex;
        align-items: center;
        justify-content: space-between;
        font-size: 28rpx;
        color: rgba(48, 49, 51, 1);
        font-weight: 700;
        .try-text {
          font-size: 24rpx;
          color: rgb(144, 147, 153);
          font-weight: normal;
        }
      }
    }
  }
}
.right-btn {
  display: flex;
  justify-content: center;
  align-items: center;
  border-radius: 8rpx;
  width: 198rpx;
  height: 64rpx;
  background-color: rgb(142, 84, 244);
  font-size: 28rpx;
  color: #fff;
  .arrow {
    width: 32rpx;
    height: 32rpx;
    margin-left: 5rpx;
  }
}
.state {
  width: 80rpx;
  height: 40rpx;
  color: rgb(58, 224, 125);
  border: 2rpx solid rgb(58, 224, 125);
  text-align: center;
  line-height: 40rpx;
  font-size: 24rpx;
  margin-left: 12rpx;
  border-radius: 4rpx;
}
.expire {
  color: rgb(255, 55, 71) !important;
  border: 2rpx solid rgb(255, 55, 71) !important;
}
.popup {
  width: 100%;
  height: 938rpx;
  background: linear-gradient(180deg, rgb(218, 196, 255) 0%, rgb(255, 255, 255) 100%);
  border-radius: 48rpx 48rpx 0 0;
  padding: 24rpx 30rpx;
  box-sizing: border-box;
  .popup-img {
    position: absolute;
    right: 30rpx;
    width: 196rpx;
    height: 156rpx;
  }
  .popup-bottom {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    box-sizing: border-box;
    height: 819rpx;
    background-color: #fff;
    border-radius: 48rpx 48rpx 0 0;
    padding: 30rpx;
    .bottom-text {
      font-size: 36rpx;
      font-weight: 700;
      color: rgb(69, 70, 74);
      margin-bottom: 30rpx;
    }
    .equity {
      display: flex;
      align-items: center;
      font-size: 36rpx;
      font-weight: 700;
      color: rgb(69, 70, 74);
      margin-bottom: 24rpx;
      border-radius: 12rpx;
    }
    .equitys {
      display: inline-block;
      box-sizing: border-box;
      width: 336rpx;
      height: 188rpx;
      padding: 30rpx 24rpx;
      background: linear-gradient(135deg, rgb(254, 245, 255) 0%, rgb(224, 207, 255) 100%);
      font-size: 26rpx;
      color: rgb(142, 84, 244);
      position: relative;
      border-radius: 12rpx;
      .equitys-text {
        font-size: 30rpx;
        color: rgb(93, 38, 189);
        font-weight: 700;
        display: block;
        margin-bottom: 6rpx;
      }
      .bgi {
        position: absolute;
        top: 40rpx;
        right: 0;
        width: 148rpx;
        height: 148rpx;
      }
    }
    .equitys1 {
      display: inline-block;
      box-sizing: border-box;
      width: 336rpx;
      height: 188rpx;
      padding: 30rpx 24rpx;
      background: linear-gradient(135deg, rgb(255, 249, 227) 0%, rgb(255, 228, 122) 100%);
      font-size: 26rpx;
      color: rgb(252, 160, 30);
      position: relative;
      .equitys-text1 {
        font-size: 30rpx;
        color: rgb(252, 118, 0);
        font-weight: 700;
        display: block;
        margin-bottom: 6rpx;
      }
      .bgi {
        position: absolute;
        top: 40rpx;
        right: 0;
        width: 148rpx;
        height: 148rpx;
      }
    }
    .bottom-pay {
      position: relative;
      width: 690rpx;
      height: 98rpx;
      display: flex;
      align-items: center;
      justify-content: space-between;
      background-color: rgb(48, 48, 48);
      border-radius: 16rpx;
      margin-top: 30rpx;
      .time {
        position: absolute;
        top: 0;
        left: 0;
        width: 112rpx;
        height: 30rpx;
        border-radius: 16rpx 16rpx 16rpx 0;
        background-color: rgb(255, 55, 71);
        font-size: 20rpx;
        color: #fff;
        text-align: center;
        line-height: 30rpx;
      }
      .botton {
        margin: 0;
        padding: 0;
        width: 324rpx;
        height: 86rpx;
        text-align: center;
        line-height: 86rpx;
        background: linear-gradient(
          90deg,
          rgba(142, 84, 244, 1) 0%,
          rgba(177, 83, 245, 1) 100%
        );
        color: #fff;
        font-size: 32rpx;
        border-radius: 12rpx;
        margin-right: 6rpx;
      }
    }
  }
}
.centerPopup {
  width: 630rpx;
  height: 312rpx;
  background-color: #fff;
  text-align: center;
  font-size: 32rpx;
  padding: 24rpx;
  box-sizing: border-box;
  border-radius: 16rpx;
  .image {
    display: block;
    width: 48rpx;
    height: 48rpx;
    margin-left: auto;
    margin-bottom: 34rpx;
  }
  .tishi {
    color: rgb(69, 70, 74);
    margin: 34rpx 0 30rpx 0;
  }
  .lianxi {
    width: 240rpx;
    height: 80rpx;
    border-radius: 310rpx;
    background-color: rgb(142, 84, 244);
    text-align: center;
    line-height: 80rpx;
    color: #fff;
    margin-top: 30rpx;
  }
}
.master-check{
  position: relative;
  width: 582rpx;
  height: 652rpx;
  border-radius: 16rpx;
  background-color: #fff;
  padding: 48rpx 36rpx;
  box-sizing: border-box;
  .master-close{
    position: absolute;
    right: 0;
    top: -60rpx;
    width: 48rpx;
    height: 48rpx;
    background-color: rgb(220,220,220);
    border-radius: 50%;
  }
  .master1{
    width: 510rpx;
    height: 196rpx;
    padding: 30rpx;
    box-sizing: border-box;
    border: 1px solid rgb(220,223,230);
    border-radius: 12rpx;
    .master1-box{
      display: flex;
      justify-content: space-between;
      font-size: 32rpx;
      // margin-bottom: 24rpx;
      font-weight: 500;
      color: rgb(48,49,51);
    }
  }
  .master-queren{
    width: 510rpx;
    height: 80rpx;
    background-color: rgb(142, 84, 244);
    line-height: 80rpx;
    border-radius: 12rpx;
    margin-top: 48rpx;
    color: #fff;
    font-size: 28rpx;
  }
  .active-master{
    border: 1px solid rgb(142, 84, 244) !important;
  }
}

.alert-dialog{
  width: 582rpx;
  // height: 344rpx;
  background-color: #fff;
  border-radius: 16rpx;
  // padding-top: 36rpx;
  // box-sizing: border-box;
  overflow: hidden;
  .alert-title{
    font-size: 34rpx;
    color: rgb(48,49,51);
    margin: 36rpx 36rpx 18rpx 36rpx;
    font-weight: 500;
  }
  .alert-time{
    font-size: 30rpx;
    color: rgb(144, 147, 153);
    margin: 18rpx 36rpx 36rpx;
  }
  .alert-btn{
    display: flex;
    height: 116rpx;
    border-top: 1px solid rgb(235,238,245);
    .alert-quxiao{
      width: 290rpx;
      height: 100%;
      border-right: 1px solid rgb(235,238,245);
      text-align: center;
      line-height: 116rpx;
      font-size: 34rpx;
      color: rgb(144, 147, 153);
    }
    
    .alert-queren{
      width: 290rpx;
      height: 100%;
      text-align: center;
      line-height: 116rpx;
      font-size: 34rpx;
      color: rgb(142, 84, 244);
    }
    
  }
}
.hover{
      background-color: rgba(142,84,244,0.7) !important;
    }
</style>
/*** * * █████▒█ ██ ▄████▄ ██ ▄█▀ ██████╗ ██╗ ██╗ ██████╗ * ▓██ ▒ ██ ▓██▒▒██▀ ▀█ ██▄█▒
██╔══██╗██║ ██║██╔════╝ * ▒████ ░▓██ ▒██░▒▓█ ▄ ▓███▄░ ██████╔╝██║ ██║██║ ███╗ * ░▓█▒ ░▓▓█
░██░▒▓▓▄ ▄██▒▓██ █▄ ██╔══██╗██║ ██║██║ ██║ * ░▒█░ ▒▒█████▓ ▒ ▓███▀ ░▒██▒ █▄
██████╔╝╚██████╔╝╚██████╔╝ * ▒ ░ ░▒▓▒ ▒ ▒ ░ ░▒ ▒ ░▒ ▒▒ ▓▒ ╚═════╝ ╚═════╝ ╚═════╝ * ░ ░░▒░
░ ░ ░ ▒ ░ ░▒ ▒░ * ░ ░ ░░░ ░ ░ ░ ░ ░░ ░ * ░ ░ ░ ░ ░ */
